<template>
  <div style="width: 100%;background: red;height: 3px;" v-if="isDesigner">
  </div>
  <div v-else :style="backStyle" ></div>
</template>

<script>
export default {
  name: "lineTemplate",
  props: {
    value: null,
    mode: {
      default: "edit", // 编辑模式和 edit， 展示模式 view 
    },
    width:{
      default:''
    },
    height:{
      default:''
    },
    background:{
      default:''
    }

  },
  data() {
    return {
     
    };
  },
  watch: {
    
  },
  computed: {
    backStyle() {
      console.log({ width:this.width+'%', background:this.background ,height:this.height+'px'},'999999999');
      return { width:this.width+'%', background:this.background+'!important' ,height:this.height+'px'}
    },
    isDesigner() {
      return this.$attrs._source === 'designer'
    },
  },
  mounted(){
      console.log(this.$attrs,'99999999');
  },
  methods:{
   
  },
};
</script>

<style scoped>

</style>